package com.martin.fastframe.ui.blood.strip

import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.martin.fastframe.R
import com.martin.fastframe.databinding.ActivityBloodStripBinding
import com.martin.fastframe.ui.binding.adapter.BindingAdapterViewModel
import com.martin.lib_base.base.BaseActivity
import com.martin.lib_base.impl.EmptyViewModel

class BloodStripActivity : BaseActivity<ActivityBloodStripBinding, EmptyViewModel>() {

    override fun getViewModelClass() = EmptyViewModel::class.java

    override fun layoutId() = R.layout.activity_blood_strip

    override fun initOnCreate(savedInstanceState: Bundle?) {
        binding.btnLeft.setOnClickListener {
            binding.bloodView.leftNumber += 1
        }
        binding.btnRight.setOnClickListener {
            binding.bloodView.rightNumber += 1
        }
    }

    companion object {
        @JvmStatic
        fun start(context: Context) {
            val starter = Intent(context, BloodStripActivity::class.java)
            context.startActivity(starter)
        }
    }
}